<?php

namespace Application\HelloBundle\Controller;

use Symfony\Framework\WebBundle\Controller;

class HelloController extends Controller
{
  public function indexAction($name)
  {
    return $this->render('HelloBundle:Hello:index', array('name' => $name));
  }

  public function showAction($id)
  {
      $stmt = $this->getDatabaseConnection()->execute('SELECT * FROM wac_system_log WHERE id = ?', array($id));

      if (!$product = $stmt->fetch()) {
          throw new NotFoundHttpException('The product does not exist.');
      }

      return $this->render('HelloBundle:Hello:show');
  }
}
